
<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>necrophilia.Time</title>
<link rel="stylesheet" type="text/css" href="candydoc/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]-->
<script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script>
<script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("necrophilia.Time", "candydoc/");</script>
	<table class="content">
		<tr><td id="docbody"><h1>necrophilia.Time</h1><!-- Generated by Ddoc from C:\Projects\necrophilia\necrophilia\Time.d -->
<b>Date:</b><br>
22.02.07
	
<span class="currsymbol">Time</span>
<script>explorer.outline.addDecl('Time');</script>

 Module holds Timer templates. This is made to make it possible for the user
	to use any time format necessery. As the most common way is to use floats in range
	[0,1] there is a chance programmers would like to hold it in frames, miliseconds or
	other format.
<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">enum 
<span class="currsymbol">TimerState</span>
<script>explorer.outline.addDecl('TimerState');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Enumeration used for holding state of the Timer.
<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">
<span class="currsymbol">Forward</span>
<script>explorer.outline.addDecl('Forward');</script>

</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Timer ticking foreward. 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">
<span class="currsymbol">Pause</span>
<script>explorer.outline.addDecl('Pause');</script>

</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Timer paused
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">
<span class="currsymbol">Backward</span>
<script>explorer.outline.addDecl('Backward');</script>

</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Timer going down
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">
<span class="currsymbol">ForwardLoop</span>
<script>explorer.outline.addDecl('ForwardLoop');</script>

</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Timer ticking foreward and in Loop Mode
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">
<span class="currsymbol">BackwardLoop</span>
<script>explorer.outline.addDecl('BackwardLoop');</script>

</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Timer ticking foreward and in Loop Mode
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">
<span class="currsymbol">Stop</span>
<script>explorer.outline.addDecl('Stop');</script>

</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Timer riched the border and stoped
<br><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">class 
<span class="currsymbol">LoopTimer</span>
<script>explorer.outline.addDecl('LoopTimer');</script>

(Time): Timer!(Time);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Extension of Timer template class. With option of loops. Lets say we have timer ticking from 0 to 10.
	It is matematicly [0,10<br><br>. Loop length is 10 in that case.  Lets say speed is 1.  When the value is 10 it will become 0.

<b>Examples:</b><br>
<pre class="d_code">	<font color=blue>alias</font> <u>LoopTimer</u>!(<font color=blue>float</font>) FloatTimer;
	FloatTimer foo=<font color=blue>new</font> FloatTimer(0.01,0,0,1);
</pre>
<br><br>
<b>Parameters:</b><br>
Time = Time type. it must have +, - , &lt;= , &gt;=, += , -= operations defined
<br><br>
<b>Notes:</b><br>
Remember that states here have a bit different meaning.
	Pause is still a pause, but
 Forward and Backwords as it is without the loop will make timer to change state to Stop, when reaching border
 ForwardLoop (default) and BackwordLoop are loops as written above, will go in their direction
<br><br>
</dd>

<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">this(Time speed, Time startValue, Time min, Time max);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>LoopTimer constructor
<br><br>
<b>Params:</b><br>
<table><tr>
<td nowrap valign="top" style="padding-right: 8px">speed</td>

               
<td>timer speed</td></tr>
<tr>
<td nowrap valign="top" style="padding-right: 8px">startValue</td>

               
<td>initial value</td></tr>
<tr>
<td nowrap valign="top" style="padding-right: 8px">min</td>

               
<td>left border</td></tr>
<tr>
<td nowrap valign="top" style="padding-right: 8px">max</td>

               
<td>right border
		so the loop is in [min,max</td></tr></table><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>



<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">this(Time speed, Time startValue);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>LoopTimer constructor
<br><br>
<b>Params:</b><br>
<table><tr>
<td nowrap valign="top" style="padding-right: 8px">speed</td>

               
<td>timer speed</td></tr>
<tr>
<td nowrap valign="top" style="padding-right: 8px">startValue</td>

               
<td>initial value</td></tr>
</table><br>
<b>Note:</b><br>
Loop Border here is not set, so both, min and max are this same - set on default value, for example
		NaN for floats. So it's necessery to call setNewBorders before first update
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">setNewBorders</span>
<script>explorer.outline.addDecl('setNewBorders');</script>

(Time <span class="funcparam">min</span>, Time <span class="funcparam">max</span>);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Function for setting the border
<br><br>
<b>Params:</b><br>
<table><tr>
<td nowrap valign="top" style="padding-right: 8px">Time <span class="funcparam">min</span></td>

               
<td>left border</td></tr>
<tr>
<td nowrap valign="top" style="padding-right: 8px">Time <span class="funcparam">max</span></td>

               
<td>right border
		so the loop is in [<span class="funcparam">min</span>,<span class="funcparam">max</span></td></tr></table><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>



<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">update</span>
<script>explorer.outline.addDecl('update');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Method updating the timer
<br><br>
<b>Returns:</b><br>
False if the state of the timer is unrecognized
<br><br>
<b>Throws:</b><br>
Exception when max and min of the border are the same
		Probably because the borders were not set
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">isStoped</span>
<script>explorer.outline.addDecl('isStoped');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Diagnostic function
<br><br>
<b>Returns:</b><br>
True if timer is stopped
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">isPlayingForwardLoop</span>
<script>explorer.outline.addDecl('isPlayingForwardLoop');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Diagnostic function
<br><br>
<b>Returns:</b><br>
True if timer is playing a loop and forward
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">isPlayingBackwardLoop</span>
<script>explorer.outline.addDecl('isPlayingBackwardLoop');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Diagnostic function
<br><br>
<b>Returns:</b><br>
True if timer is playing a loop and backward
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">playForwardLoop</span>
<script>explorer.outline.addDecl('playForwardLoop');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Sets timer to tick foreward in a loop
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">playBackwardLoop</span>
<script>explorer.outline.addDecl('playBackwardLoop');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Sets timer to tick backward in a loop
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">Time 
<span class="currsymbol">min</span>
<script>explorer.outline.addDecl('min');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Diagnostic method
<br><br>
<b>Returns:</b><br>
current low border
	
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">Time 
<span class="currsymbol">max</span>
<script>explorer.outline.addDecl('max');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>Diagnostic method
<br><br>
<b>Returns:</b><br>
current upper border
	
<br><br>

</dd>
)
)
)
</td></tr>
		<tr><td id="docfooter">
			Page was generated with
			<img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
			on Wed Mar 21 02:44:07 2007

		</td></tr>
	</table>
</div>
<script>
   explorer.packageExplorer.addModule("necrophilia.Exception");
   explorer.packageExplorer.addModule("necrophilia.Time");
   explorer.packageExplorer.addModule("necrophilia.helpers.Callback");
   explorer.packageExplorer.addModule("necrophilia.helpers.Interpolation");
   explorer.packageExplorer.addModule("necrophilia.helpers.ListArray");
   explorer.packageExplorer.addModule("necrophilia.animation.Base");
   explorer.packageExplorer.addModule("necrophilia.animation.DataNodes");
   explorer.packageExplorer.addModule("necrophilia.animation.Instance");
   explorer.packageExplorer.addModule("necrophilia.animation.Inteligent");
   explorer.packageExplorer.addModule("necrophilia.skeleton.DataNodes");
   explorer.packageExplorer.addModule("necrophilia.skeleton.Bone");
   explorer.packageExplorer.addModule("necrophilia.skeleton.Skeleton");</script>
</body></html>


